home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Graphics Programming (2nd Edition)
/
Visual Basic Graphics Programming 2nd Edition.iso
/
OldSrc
/
CH1
/
SRC
/
FONTSHOW.FRM
< prev
next >
Wrap
Text File
|
1996-05-02
|
2KB
|
89 lines
VERSION 4.00
Begin VB.Form FontListForm
Caption = "List Fonts"
ClientHeight = 4260
ClientLeft = 2115
ClientTop = 1500
ClientWidth = 4815
Height = 4950
Left = 2055
LinkTopic = "Form1"
ScaleHeight = 4260
ScaleWidth = 4815
Top = 870
Width = 4935
Begin VB.ListBox ScreenList
Height = 3930
Left = 120
Sorted = -1 'True
TabIndex = 0
Top = 120
Width = 2175
End
Begin VB.Label DemoLabel
BorderStyle = 1 'Fixed Single
BeginProperty Font
name = "MS Sans Serif"
charset = 1
weight = 400
size = 12
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 3975
Left = 2400
TabIndex = 1
Top = 120
Width = 2295
WordWrap = -1 'True
End
Begin VB.Menu mnuFile
Caption = "&File"
Begin VB.Menu mnuFileExit
Caption = "E&xit"
End
End
End
Attribute VB_Name = "FontListForm"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Dim i As Integer
' Fill the font list with font names.
For i = 0 To Screen.FontCount - 1
ScreenList.AddItem Screen.Fonts(i)
Next i
ScreenList.ListIndex = 0
ScreenList.Selected(0) = True
' Fill in the demo text.
DemoLabel.Caption = "ABCDE" & vbCrLf & _
"FGHIJ" & vbCrLf & "KLMNO" & vbCrLf & _
"PQRST" & vbCrLf & "UVWXYZ" & vbCrLf & _
"abcde" & vbCrLf & "fghij" & vbCrLf & _
"klmno" & vbCrLf & "pqrst" & vbCrLf & _
"uvwxyz" & vbCrLf & "12345" & vbCrLf & _
"67890"
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub mnuFileExit_Click()
Unload Me
End Sub
Private Sub ScreenList_Click()
DemoLabel.Font.Name = ScreenList.List(ScreenList.ListIndex)
End Sub